import Cookies from 'js-cookie';

const TokenKey = 'accessToken';

let cookies = {};

cookies.getToken = function getToken () {
  return Cookies.get(TokenKey);
};

cookies.setToken = function setToken (token) {
  return Cookies.set(TokenKey, token, { expires: 7 });
};

cookies.removeToken = function removeToken () {
  return Cookies.remove(TokenKey);
};


export default cookies;
